package com.sdry.good.goodChain.service;
import java.util.List;
import javax.annotation.Resource;

import com.sdry.basic.entity.Material;
import com.sdry.good.logistics.entity.ReportPicking;
import com.sdry.product.prod.entity.LacquerInto;
import com.sdry.product.prod.entity.ProductTwoPaint;
import com.sdry.transit.entity.TransitOrder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.sdry.good.goodChain.entity.GoodChain;
import com.sdry.good.goodChain.service.GoodChainService;
import com.sdry.good.goodChain.mapper.GoodChainMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
 *
 *@ClassName: GoodChainService
 *@Description: 链条绑定表
 *@Author tdd
 *@Date 2020-03-23 15:24:50
 *@version 1.0
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class GoodChainServiceImpl implements GoodChainService {
	@Resource GoodChainMapper goodChainMapper;
	//声明一个Logger
	private final static Logger logger = LoggerFactory.getLogger(GoodChainServiceImpl.class);
	/** 
	 * 条件查询所有
	 * @param param 实体条件
	 * @return 实体集合
	*/
	public List<GoodChain> queryAllByMution(GoodChain param) {
		return goodChainMapper.queryAllByMution(param);
	}
	/** 
	 * 条件分页查询
	 * @param param 实体条件
	 * @return 实体集合
	*/
	public List<GoodChain> findPageByMution(GoodChain param) {
		return goodChainMapper.findPageByMution(param);
	}
	/** 
	 * 条件查询记录数
	 * @param param 实体条件
	 * @return 实体集合
	*/
	public Integer selectCountByMution(GoodChain param) {
		return goodChainMapper.selectCountByMution(param);
	}
	/** 
	 * 插入返回id
	 * @param param 实体条件
	 * @return 主键id
	*/
	public Long insert(GoodChain param) {
		return goodChainMapper.insert(param);
	}
	/** 
	 * 根据主键更新 返回影响行数
	 * @param param 实体条件
	 * @return 影响行数
	*/
	public Integer update(GoodChain param) {
		return goodChainMapper.update(param);
	}

	/**
	 * 条件分页查询库存
	 * @param param 实体条件
	 * @return 实体集合
	 */
	public List<GoodChain> findInventoryPageByMution(GoodChain param) {
		return goodChainMapper.findInventoryPageByMution(param);
	}

	/**
	 * 条件分页查询库存
	 * @param param 实体条件
	 * @return 实体集合
	 */
	public Integer selectInventoryCountByMution(GoodChain param) {
		return goodChainMapper.selectInventoryCountByMution(param);
	}
	/**
	 * 条件查询喷涂线绑定表
	 * @param param 实体条件
	 * @return 实体集合
	 */
	public List<LacquerInto> selectLacquerIntoByMution(LacquerInto param){
		return goodChainMapper.selectLacquerIntoByMution(param);
	}

	/**
	 * 查询喷漆并以喷涂带回
	 * @param productTwoPaint 条件
	 * @return 实体集合
	 */
    public List<LacquerInto> selectProductTwoPaintZhuangQacquerInto(ProductTwoPaint productTwoPaint) {
		return goodChainMapper.selectProductTwoPaintZhuangQacquerInto(productTwoPaint);
    }

	/**
	 * 根据生产指令查询物料信息
	 * @param transitOrder 生产指令条件
	 * @return 物料信息
	 */
    public List<Material> selectMaterialByTransitOrder(TransitOrder transitOrder) {
		return goodChainMapper.selectMaterialByTransitOrder(transitOrder);
    }
}
